package com.hsylient.mybatis.controller;

import com.hsylient.common.entity.Student;
import com.hsylient.mybatis.service.StudentService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
public class StudentController {

    @Resource
    private StudentService studentService;

    @PostMapping("/v3/modify")
    public void modify(@RequestBody Student student) {
        studentService.modify(student);
    }


    @GetMapping("/v3/student/find")
    public Student modify(@RequestParam("id") Long id) {
        return studentService.findById(id);
    }
}
